<template>
  <view class="search-result-item-box">
    <!-- 标题 -->
     <rich-text :nodes="data.body" class="item-title line-clamp-2"></rich-text>
     <!-- 内容区域 -->
      <rich-text :nodes="data.description" class="item-desc line-clamp-2"></rich-text>
      <!-- 底部 -->
       <view class="item-desc-bottom">
        <view class="item-author">{{ data.author }}</view>
        <view class="item-read-num">
          <uni-icons
            type="compose"
            color="#999999"
            class="read-num-icon"
          />
          <text>{{ $filters.relativeTime(data.created_at) }}</text>
        </view>
       </view>
  </view>
</template>

<script>
  export default {
    name:"history-item-1",
    props:{
      data:{
        type:Object,
        required:true
      }
    },
    data() {
      return {
        
        
      };
    }
  }
</script>

<style lang="scss" scoped>
.search-result-item-box{
  margin-bottom: 15px;
  .item-title{
    font-size: 14px;
    font-weight: 700;
    color: $uni-main-color;

  }
  .item-desc{
    margin-top: 8px;
    font-size: 14px;
    color: $uni-info;

  }
  .item-desc-bottom{
    margin-top: 8px;
    display: flex;
    color: grey;
    font-size: 8px;
    .item-author{
      margin-right: 12px;
    }
    .item-read-num{
      .read-num-icon{
        color: $uni-secondary-color;
        margin-right: 8px;
      }
    }

  }

}

</style>